package com.example.user.controller;

import com.example.user.utils.EsUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.HashMap;

@RestController
@Slf4j
public class EsController {


    @GetMapping("/cIndex")
    public HashMap<String,String> getPort() throws IOException {
        EsUtils.createIndex("test",5,1);

       return new HashMap<String,String>(){{
           put("SUCCESS","HEIHEI");
       }};
    }
}
